package 算法练习;

import java.util.Scanner;

/** 

* @author ：soulstones
* @version ：2019年9月15日 下午9:04:51 
* @Description：
* 
2020 2040
2020
2040
2
*/
public class zuixiaozhi {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String line = scanner.nextLine();
		String[] split = line.split(" ");
		int start=0,end=0;
		for (int i = 0; i < split.length; i++) {
			 start=Integer.parseInt(split[i]);
			end=Integer.parseInt(split[++i]);
		}
		System.out.println(start);
		System.out.println(end);
		System.out.println(min(start, end));
		
	}
	public static int min(int start,int end) {
		int min=Integer.MAX_VALUE;
		int result=0;
		for (int i =start; i <=end; i++) {
			for (int j = start+1; j <=end; j++) {
				 result= (i*j)%2019;
				 if (result<=min) {
						int temp=result;
						result=min;
						min=temp;
					}
			}
			
		}
		
		
		return min;
		
	}

}
